<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
    <link rel="stylesheet" href="https://www.12371.cn/mydsjd/h5/css/style3.css"/>
    <script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
    <script src="https://www.12371.cn/mydsjd/h5/js/jquery-1.10.2.js"></script>
    <script src="https://www.12371.cn/mydsjd/h5/js/wxshare.js"></script>
    <title>党史天天学 | 知识竞答</title>
</head>
<body>
<script>
    var deviceWidth = document.documentElement.clientWidth;
    if (deviceWidth > 750) {
        //document.documentElement.style.fontSize = 750 / 7.50 + "px";
	document.documentElement.style.fontSize=deviceWidth/7.50+"px";
    } else {
        document.documentElement.style.fontSize = deviceWidth / 7.50 + "px";
    }
    if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
    handleFontSize();
    } else {
    if (document.addEventListener) {
    　　　　document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
    　　} else if (document.attachEvent) {
    　　　　document.attachEvent("WeixinJSBridgeReady", handleFontSize);
    　　　　document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
    　　}
    }
    function handleFontSize() {
    　　// 设置网页字体为默认大小
    　　WeixinJSBridge.invoke('setFontSizeCallback', {'fontSize': 0});
    　　// 重写设置网页字体大小的事件
    　　WeixinJSBridge.on('menu:setfont', function () {
        WeixinJSBridge.invoke('setFontSizeCallback', {'fontSize': 0});
    });
    }
</script>
<div class="body">
    <div class="nav">
        <ul>
            <li class="one">
                <a href="{{ route('index') }}"></a>
            </li>
            <li class="two">
                <a href="{{ route('rank') }}">学习成绩</a>
            </li>
        </ul>
    </div>
    <div style="clear: both;"></div>
    <div class="pop_3">
        <ul>
            @php
                /** @var \Illuminate\Support\Collection $rank */
                $first = $rank->shift();
                $second = $rank->shift();
                $third = $rank->shift();
            @endphp
            <li class="one" {{ $first ? '' : 'style="display: none;"' }}>
                <img src="{{ $first ? ($first->weChatUser->avatar ?: asset('img/avatar.png')) : asset('img/avatar.png') }}" alt="">
                <span style="white-space: nowrap; overflow: hidden; vertical-align: bottom;">{{ $first ? $first->weChatUser->nickname : '' }}</span>
                <span>{{ $first ? $first->score : '' }}</span>
            </li>
            <li class="two" {{ $second ? '' : 'style="display: none;"' }}>
                <img src="{{ $second ? ($second->weChatUser->avatar ?: asset('img/avatar.png')) : asset('img/avatar.png') }}" alt="">
                <span style="white-space: nowrap; overflow: hidden; vertical-align: bottom;">{{ $second ? $second->weChatUser->nickname : '' }}</span>
                <span>{{ $second ? $second->score : '' }}</span>
            </li>
            <li class="thr" {{ $third ? '' : 'style="display: none;"' }}>
                <img src="{{ $third ? ($third->weChatUser->avatar ?: asset('img/avatar.png')) : asset('img/avatar.png') }}" alt="">
                <span style="white-space: nowrap; overflow: hidden; vertical-align: bottom;">{{ $third ? $third->weChatUser->nickname : '' }}</span>
                <span>{{ $third ? $third->score : '' }}</span>
            </li>
        </ul>
    </div>
    <div class="list">
        <ul>
            @foreach($rank as $item)
                <li>
                    <span class="tit">{{ $loop->index + 4 }}</span>
                    <img src="{{ $item->weChatUser->avatar ?: asset('img/avatar.png') }}" alt="">
                    <span style="white-space: nowrap; overflow: hidden; vertical-align: bottom; width: 35%">{{ $item->weChatUser->nickname }}</span>
                    <span class="last">{{ $item->score }}</span>
                </li>
            @endforeach
        </ul>
        <div style="height: 0.76rem;"></div>
    </div>
    <div class="pm">
        我当前的排名：{{ $userRank }}
    </div>
    <script>
        var title = '我在“党史天天学”知识竞答中排名第{{ $userRank }}，快来挑战我吧！';
        getShare(title);
    </script>
</div>
<script>
var pagecode="T-003-000-000";
with(document)with(body)with(insertBefore(createElement("script"),firstChild))setAttribute("exparams","v_id=&aplus&page_code="+pagecode,id="tb-beacon-aplus",src=(location>"https"?"//js":"//js")+".data.cctv.com/__aplus_plugin_cctv.js,aplus_plugin_aplus_u.js")
</script>
</body>
</html>
